<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="myOrder">返回</button>
    <h3 class="title">订单详情</h3>
  </ion-header-bar>
  <ion-content>
    <!--<div ng-if="showloading" class="ion-spinner">-->
      <!--<ion-spinner icon="lines" class="spinner-calm"></ion-spinner>-->
    <!--</div>-->
    <ion-list class="myList">
      <li class="item li" style="margin-bottom: 0;">
        <div>
          <i>订单编号</i>
          <i class="value">{{orderDetail.ORDER_NO}}</i>
        </div>
        <div>
          <i>订单日期</i>
          <i class="value">{{orderDetail.CREATE_DATE | date : "yyyy-MM-dd"}}</i>
        </div>
        <div>
          <i>订单类型</i>
          <i class="value">{{orderType}}</i>
        </div>
        <div>
          <i>订单状态</i>
          <i class="value">{{orderStatus}}</i>
        </div>
      </li>
      <div class="item item-input item-divider div">
        <img src="img/fhr_logo.png" class="typeIcon" style="height: 25px;">
        <i class="dark">发货信息</i>
      </div>
      <div class="item item-input div">
        <i>{{orderDetail.CONSIGNOR_NAME}}</i>
      </div>
      <div class="item item-input div">
        <i>{{orderDetail.CONSIGNOR_PHONE}}</i>
      </div>
      <div class="address">
        {{orderDetail.CONSIGNOR_ADDRESS_UNION}}
      </div>
      <div ng-controller="TransWaybillCtrl" style="margin-top: 15px;">
        <li class="item li" ng-repeat="data in waybillsOfTransData">
          <div>
            <i>承运单号</i>
            <i class="value" style="color: #ff9800">{{data.WAYBILL_NO}}</i>
          </div>
          <div>
            <i class="balanced">{{data.S_CUSTOMER_NAME}}</i>
            <i class="ion-arrow-right-a value arrow-right" ng-if="data.DESTINATION_NAME!=null"></i>
            <i class="value assertive">{{data.DESTINATION_NAME}}</i>
            <i class="ion-arrow-right-a value arrow-right" ng-if="data.DESTINATION_STATION!=null"></i>
            <i class="value energized">{{data.DESTINATION_STATION}}</i>
          </div>
          <div>
            <i>到付</i>
            <i class="value" ng-if="data.TO_PAYMENT!=null">{{data.TO_PAYMENT | number:2}}元</i>
            <i class="value" ng-if="data.TO_PAYMENT==null">0.00元</i>
          </div>
          <div>
            <i>代收款</i>
            <i class="value" ng-if="data.AGENCY_FUND!=null">{{data.AGENCY_FUND | number:2}}元</i>
            <i class="value" ng-if="data.AGENCY_FUND==null">0.00元</i>
          </div>
        </li>
        <ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="hasNextPage()"></ion-infinite-scroll>
      </div>
    </ion-list>
  </ion-content>
</ion-view>
